/**
 * 
 */
package com.youth.fund.hk.hostManager.manager.datamodel;

import java.util.List;

import com.youth.fund.hk.hostManager.common.datamodel.AbstractDatamodel;

/**
 * @author Sunk_Sky
 *
 * 2014年11月19日下午2:42:49
 */
public class TypeModel extends AbstractDatamodel
{

	/**
	 * 
	 */
	private static final long serialVersionUID = -6537731676628402351L;
	
	private String name;
	
	private String code;
	
	private String content;
	
	private int parent_id;
	
	private TypeModelType type ;
	
	private String parent_code;
	
	private String lang;
	
	private String img_path;
	
	private String parent_ids;
	
	private boolean available;
	
	private String url;
	
	private List<TypeModel> children_list;
	
	private TypeModel parent;
	
	private CaseModel cm;
	
	private List<ProductModel> pm_list;
	
	

	public String getContent()
	{
		return content;
	}

	public void setContent(String content)
	{
		this.content = content;
	}

	public CaseModel getCm()
	{
		return cm;
	}

	public void setCm(CaseModel cm)
	{
		this.cm = cm;
	}

	public List<ProductModel> getPm_list()
	{
		return pm_list;
	}

	public void setPm_list(List<ProductModel> pm_list)
	{
		this.pm_list = pm_list;
	}

	public TypeModel()
	{
		parent_id = -1;
	}
	
	public boolean isRootNode()
	{
		return this.parent_id==0;
	}
	
	public String makeSelfAsParentIds()
	{
		return this.getParent_ids()+this.getId()+"/";
	}
	
	public static enum TypeModelType
	{
		menu("类别"),button("产品");
		private final String info;
		
		private TypeModelType(String info)
		{
			this.info=info;
		}
		public String getInfo()
		{
			return info;
		}
		
	}
	
	
	
	
	public TypeModelType getType() {
		return type;
	}

	public void setType(TypeModelType type) {
		this.type = type;
	}

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public String getCode()
	{
		return code;
	}

	public void setCode(String code)
	{
		this.code = code;
	}

	public int getParent_id()
	{
		return parent_id;
	}

	public void setParent_id(int parent_id)
	{
		this.parent_id = parent_id;
	}

	public String getParent_code()
	{
		return parent_code;
	}

	public void setParent_code(String parent_code)
	{
		this.parent_code = parent_code;
	}

	public String getLang()
	{
		return lang;
	}

	public void setLang(String lang)
	{
		this.lang = lang;
	}

	public String getImg_path()
	{
		return img_path;
	}

	public void setImg_path(String img_path)
	{
		this.img_path = img_path;
	}

	public String getParent_ids()
	{
		return parent_ids;
	}

	public void setParent_ids(String parent_ids)
	{
		this.parent_ids = parent_ids;
	}

	public boolean isAvailable()
	{
		return available;
	}

	public void setAvailable(boolean available)
	{
		this.available = available;
	}

	public String getUrl()
	{
		return url;
	}

	public void setUrl(String url)
	{
		this.url = url;
	}

	public List<TypeModel> getChildren_list()
	{
		return children_list;
	}

	public void setChildren_list(List<TypeModel> children_list)
	{
		this.children_list = children_list;
	}

	public TypeModel getParent()
	{
		return parent;
	}

	public void setParent(TypeModel parent)
	{
		this.parent = parent;
	}
	
	
}
